package com.jianzh5.entity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * <p>
 * <code>TStatic</code>
 * </p>
 *
 * @author jianzhang11
 * @version 1.0
 * @desc
 * @Date: 2016/9/12 10:11
 * @since 1.0
 */
@Entity
@Table(name = "t_static", catalog = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TStatic {
    private Integer id;
    private String title;
    private Integer type;
    private String typeName;
    private String context;
    private String author;
    private Date createDate;


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "typeName")
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Column(name = "context")
    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    @Column(name = "author")
    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Column(name = "createDate", length = 19)
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override public String toString() {
        return "TStatic{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", type=" + type +
                ", typeName='" + typeName + '\'' +
                ", context='" + context + '\'' +
                ", author='" + author + '\'' +
                ", createDate=" + createDate +
                '}';
    }
}
